package com.Day1009;

import java.io.*;

public class Text8 {
    public static void main(String[] args) throws Exception {
        File filer = new File("F:\\Java\\懒羊羊.png");
        File filew = new File("F:\\Java\\懒羊羊1.png");
        FileInputStream fileInputStream = new FileInputStream(filer);
        //DataInputStream dataInputStream = new DataInputStream(filer);
        FileOutputStream fileOutputStream = new FileOutputStream(filew);
        //DataOutputStream dataOutputStream = new DataOutputStream(filew)
        byte[] temp = new byte[1024];
        while (fileInputStream.read(temp) != -1){
            fileOutputStream.write(temp);
        }
        fileOutputStream.flush();
        fileOutputStream.close();
        fileInputStream.close();

    }
}
